import * as React from "react";
import { render } from "react-dom";
import { Router, Route, browserHistory } from 'react-router';
import { Layout } from 'global/Layout';
// import Index from 'page1/Index';
var Index=require('page1/Index');
console.log(Index);
import './index.less';
render((
  <Router history={browserHistory}>
    <Route path="/" component={Layout}>
      <Route path="page1" getComponent={(nextState, callback) => require.ensure([], require => callback(null, require('page1/Index')))} />
      <Route path="page2" getComponent={(nextState, callback) => require.ensure([], require => callback(null, require('page2/Index')))} />
    </Route>
  </Router>
),
  document.getElementById('container')
);